
const routes = [
  {
    path: '/',
    component: () => import('layouts/MainLayout.vue'),
    redirect: '/home',
    children: [
      { path: '/home', name: 'home', meta: {title: '首页'}, component: () => import('pages/Index.vue') },

      { path: '/system/user', name: 'systemUser', meta: {group: '系统管理', title: '用户管理'}, component: () => import('pages/Index.vue') },
      { path: '/system/role', name: 'systemRole', meta: {group: '系统管理', title: '角色管理'}, component: () => import('pages/Index.vue') },
      { path: '/system/permission', name: 'systemPermission', meta: {group: '系统管理', title: '权限管理'}, component: () => import('pages/Index.vue') },

      { path: '/monitor/online', name: 'monitorOnline', meta: {group: '系统监控', title: '在线用户'}, component: () => import('pages/Index.vue') },

    ]
  }
]

// Always leave this as last one
if (process.env.MODE !== 'ssr') {
  routes.push({
    path: '*',
    component: () => import('pages/Error404.vue')
  })
}

export default routes
